<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    
<script>
   var num = prompt("请输入你要叠多少次？") 
   var num2 = prompt("请输入你要叠的数字？") 
   var zs = 0
   var shu = 0
   if(num2>=1&&num2<=9){
       for(var i = 0;i<num;i++){
           shu = shu*10+num2*1
           zs = zs+shu
       }
   }
   console.log(zs)

</script>
</body>

</html>
